package thread;

/**
 * @Author fallrain
 * @Description 实现Runnable接口，重写run方法，实现Runnable接口的实现类的实例对象作为Thread构造函数的target
 * @Date 2022/2/10 17:53
 * @Version 1.0
 */
public class RealizationRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName()+ "我是通过实现接口的线程实现方式");
    }

    public static void main(String[] args) {
        System.out.println(Thread.currentThread().getName());
        Thread t1 = new Thread(new RealizationRunnable());
        t1.start();
    }
}
